import os
import openai


#openai.api_key='https://api.fe8.cn/v1'
openai.api_key='https://api.openai.com/v1'
openai.api_base='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'

while True:
    inputs = input("Enter your message: ")
    if(inputs == "exit"):
        break

    messages = [{
        "role":"user",
        "content":inputs
    }]

    model = "gpt-3.5-turbo-0613"
    chatClient = openai.chat.completions.create(model=model,messages=messages,temperature=0)
    responseText = chatClient.choices[0].message["content"]
    print(responseText)